package com.gaoyi.crm.adapter;

import android.content.Context;

import com.gaoyi.crm.R;
import com.gaoyi.crm.adapter.base.BaseEntityAdapter;
import com.gaoyi.crm.adapter.base.BaseViewHolder;
import com.gaoyi.crm.databinding.RvImageBinding;
import com.gaoyi.crm.db.entity.PmnAttach;

public class ImageAdapter extends BaseEntityAdapter<RvImageBinding, PmnAttach> {
    public ImageAdapter(Context context) {
        super(context);
    }

    @Override
    protected void setBindingVariable(RvImageBinding binding) {

    }

    @Override
    protected void onBindItem(RvImageBinding binding, PmnAttach item, int position) {
        String photo = item.getAttach();
        binding.tvImageName.setText(photo.substring(photo.lastIndexOf("/") + 1));
    }

    @Override
    protected void onCreateView(RvImageBinding binding, BaseViewHolder holder) {

    }

    @Override
    protected int getLayoutResId() {
        return R.layout.rv_image;
    }
}
